
#include<wx/wx.h>
#include"Sat.h"

Sat::Sat()
{
	Sat::m_sat=0;
	Sat::m_min=0;
	Sat::m_sec=0;
	Sat::m_status=true;
}

void Sat::Start(wxCommandEvent& WXUNUSED(event))
{

}

Sat::~Sat()
{

}

void Sat::Stopwatch()
{
	/*wxString sSat,sMin,sSec; 
	time_t start,stop;
	wxString str;
	long int stopwatch=0;
	int radix=10;
	char buf[100];
	time(&start);
	for(int i=0; i<=60;i++){	
		if(!m_status)
			break;
		if(m_sec==60)
		{
			i=0;
			m_sec=0;
			m_min++;
		}
		if(m_min==60)
		{
			i=0;
			m_sec=0;
			m_min=0;
			m_sat++;
		}
		sSat=itoa(m_sat,buf,radix);
		sMin=itoa(m_min,buf,radix);
		sSec=itoa(m_sec++,buf,radix);
		display->ShowPosition(1);
		//display->Clear();
		//display->ClearBackground();
		Wait(1);	//pause 1 sec
		display->AppendText(sSat + _(":") + sMin + _(":") + sSec );
		display->Show(true);
		display->AppendText("              ");
	}
	time(&stop);*/
}
void Sat::Wait(int seconds)
{
	clock_t endwait;
	endwait = clock () + seconds * CLK_TCK ;
	while (clock() < endwait) {}
}
void Sat::Stop(wxCommandEvent& WXUNUSED(event))
{

}
void Sat::Reset(wxCommandEvent& WXUNUSED(event))
{

}
